		layui.use([ 'form', 'laydate', 'upload', 'layer' ], function() {
			var form = layui.form;
			var laydate = layui.laydate;
			var upload = layui.upload;
			var layer = layui.layer;
			var $ = layui.$;

			//日期
			laydate.render({
				elem : '#startTime'
			});
			laydate.render({
				elem : '#endTime'
			});
			laydate.render({
				elem : '#creatTime'
			});
			
			$.ajax({
				url : webPath + '/clientController/queryAll',
				type : 'post', 
				dataType : 'json',
				success : function(json) {
					if (json && json.code == 200) {
						var selectId = '';
						layui.each(json.data,function(index,item){
							selectId += '<option value="'+item.id+'">'+item.name+'</option>';
						});
						$('select[name = "clientId"][id = "souclientId"]').append(selectId);
						var clientIdEd = '${customerCare.clientId}';
						if(clientIdEd != ''){
							$('option[value = "'+clientIdEd+'"]').prop("selected","selected");
						}
						form.render('select'); //更新form
					} else {
						layer.msg('数据有误');
					}
				},
				error : function() {
					layer.msg('系统出错,请联系管理员');
				}
			});
			form.on('select(selectClient)', function(data){
				$("#clientNameId").val($(this)[0].innerHTML);
			});
			 if('${customerCare.caringWay}' != ''){
				var way = '${customerCare.caringWay}';
				$('option[value = "'+way+'"]').prop("selected","selected");
				$('#caringWayId').prop("disabled","disabled");
			}; 
			if('${customerCare.id}' != ''){
				$("#souclientId").attr("disabled","disabled");
				$('input[name="id"]').prop("disabled","disabled");
			}
			form.render('select'); //更新form
		});